package blog.web.find;

import blog.sys.data.release.ReleaseContentInfo;
import blog.sys.service.FindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import pub.spring.web.mvc.ActionResult;

import java.util.List;

@Controller
public class MainController {

    @RequestMapping
    public ActionResult onGetReleaseContent() {

        List<ReleaseContentInfo> contentList = findService.onGetReleaseContentService();
        ActionResult result = ActionResult.ok();
        result.setData(contentList);
        return result;
    }

    @Autowired
    private FindService findService;

}
